﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerInfo.aspx.cs" Inherits="CRM.Web.Pop.CustomerInfo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/pop.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" defer="defer"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/Common.js" defer="defer"></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
    <script type="text/javascript"  defer="defer" >

        $(document).ready(function() {
            $('#btnAddCustomer').bind("click", function() {
                var phone = $(window.parent.document.getElementById("lblTel")).html();
                var url = '../VehicleManage/AddVehicleCustomer.aspx?PHONE=' + phone;
                var title = 'AddVehicleCustomer';
                openModalDialog(url, title, 800, 650);
            });
            $('.row').bind("dblclick", function() {
                $(this).find("a[id$='lbtnSelected']").click();
            }).attr("style", "cursor:hand; cursor:pointer;");
            $('.row2').bind("dblclick", function() {
                $(this).find("a[id$='lbtnSelected']").click();
            }).attr("style", "cursor:hand; cursor:pointer;");

            var scrollHeight = document.body.scrollHeight;
            if (scrollHeight == 0) {
                scrollHeight = 300;
            }
            window.parent.document.getElementById('frameCustomer').style.height = (scrollHeight + 20) + 'px';

        });
        
        function setValue(customerId, customerCode) {
            var win = null;
            if (window.parent.frameWorkOrder != null) {
                win = window.parent.frameWorkOrder;
                win.SetCustomerInfo(customerId, customerCode);
            }
            if (window.parent.frameVehicle != null) {
                window.parent.frameVehicle.location.href = "VehicleInfo.aspx?CUSTOMERID=" + customerId + "&CUSTOMERCODE=" + customerCode;
            }
            return false;
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
<table border="0" cellpadding="0" cellspacing="0" id="tTitle" style="display: none;">
    <tr>
	<td class="left">
	    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
	</td>
	<td class="middle">

    <div class="pagetitle">
        <div><asp:Label ID="lblTitle" runat="server" Text="相关客户信息列表" ></asp:Label></div>
    </div>
	
	</td>
	<td class="right">
	    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
	</td>
    </tr>
</table>
    <div style="width: 100%">
        <div class="listdiv">
            <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                <tr>
                    <td class="title"><div  class="nowrap">
                        姓名:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtCUSTOMERNAME" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title"><div  class="nowrap">
                        号码:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtMOBILEPHONE" runat="server" CssClass="txt" MaxLength="20" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title"><div  class="nowrap" style="">
                        整机编号:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtVINCODE" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="title"><div  class="nowrap">
                        发动机号:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtENGINENUMBER" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    
                    <td class="title"><div  class="nowrap">
                        </div>
                    </td>
                    <td class="content">
                    </td>
                    <td class="title"><div  class="nowrap">
                        </div>
                    </td>
                    <td class="content">
                    </td>
                    
                    <td class="title" style="width: auto;">
                        &nbsp;
                    </td>
                    <td class="content">
                        <div style="width: 200px;" class="nowrap">
                            <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                OnClick="btnSearch_Click" />
                            <input id="btnAddCustomer" runat="server" value="新 增" type="button" class="btn" /></div>
                    </td>
                </tr>
            </table>	
            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="true" 
                AllowSorting="true" PageSize="10"  SortExpressionValue="CUSTOMERID">
                <Columns>
			    <asp:BoundField DataField="CUSTOMERID" HeaderText="客户编号"  SortExpression="CUSTOMERID" Visible="false" />
			    <asp:BoundField DataField="CUSTOMERCODE" HeaderText="客户代码"  SortExpression="CUSTOMERCODE" />
			    <asp:BoundField DataField="CUSTOMERNAME" HeaderText="客户姓名"  SortExpression="CUSTOMERNAME" />
			    <asp:BoundField DataField="FIRSTCONTACTTEL" HeaderText="首选联系号码"  SortExpression="FIRSTCONTACTTEL" />
			    <asp:BoundField DataField="MOBILEPHONE" HeaderText="手机号码"  SortExpression="MOBILEPHONE" />
			    <asp:BoundField DataField="HOMEPHONE" HeaderText="座机号码"  SortExpression="HOMEPHONE" />
			    <asp:BoundField DataField="ADDRESS" HeaderText="详细地址"  SortExpression="ADDRESS" Visible="false" />
			    <asp:BoundField DataField="COUNTRY" HeaderText="国家"  SortExpression="COUNTRY" Visible="false"/>
			    <asp:BoundField DataField="PROVINCE" HeaderText="省份"  SortExpression="PROVINCE" Visible="false"/>
			    <asp:BoundField DataField="PREFECTURECITY" HeaderText="地级市"  SortExpression="PREFECTURECITY" Visible="false"/>
			    <asp:BoundField DataField="CITY" HeaderText="区/县/市"  SortExpression="CITY" Visible="false" />
			    <asp:BoundField DataField="VILLAGETOWN" HeaderText="乡/镇/街道"  SortExpression="VILLAGETOWN" Visible="false"/>
			    <asp:BoundField DataField="VILLAGE" HeaderText="村"  SortExpression="VILLAGE" Visible="false"/>
			    <asp:BoundField DataField="GROUPTEAM" HeaderText="组/队"  SortExpression="GROUPTEAM" Visible="false"/>
			    <asp:BoundField DataField="CUSTOMERBASE" HeaderText="客户群"  SortExpression="CUSTOMERBASE" />
			    <asp:BoundField DataField="CUSTOMERTYPE" HeaderText="客户类型"  SortExpression="CUSTOMERTYPE"  Visible="false"/>
			    <asp:BoundField DataField="CUSTOMERLEVEL" HeaderText="客户等级"  SortExpression="CUSTOMERLEVEL"  Visible="false"/>
			    <asp:BoundField DataField="SPECIALTYPE" HeaderText="特殊类型"  SortExpression="SPECIALTYPE"  Visible="false"/>
			    <asp:BoundField DataField="BIGCUSTOMERTYPE" HeaderText="大客户类型"  SortExpression="BIGCUSTOMERTYPE"  Visible="false"/>
			    <asp:BoundField DataField="STATUS" HeaderText="状态"  SortExpression="STATUS" />
			    <asp:BoundField DataField="IDNUMBER" HeaderText="证件号码"  SortExpression="IDNUMBER" />
			    <asp:BoundField DataField="EMAIL" HeaderText="邮件地址"  SortExpression="EMAIL" Visible="false"/>
			    <asp:BoundField DataField="ZIPCODE" HeaderText="邮编"  SortExpression="ZIPCODE" />
			    <asp:BoundField DataField="FAX" HeaderText="传真"  SortExpression="FAX" Visible="false"/>
			    <asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME" Visible="false"/>
			    <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID" Visible="false"/>
			    <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号"  SortExpression="LASTMODIFYPEOPLEID" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人"  SortExpression="LASTMODIFYPEOPLE" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间"  SortExpression="LASTMODIFYTIME" Visible="false"/>
			    <asp:BoundField DataField="REMARK" HeaderText="备注"  SortExpression="REMARK" Visible="false"/>
			    <asp:BoundField DataField="STATUSLOG" HeaderText="记录状态变更日志"  SortExpression="STATUSLOG" Visible="false"/>
			    <asp:BoundField DataField="FTIMESTAMP" HeaderText="时间戳"  SortExpression="FTIMESTAMP" Visible="false"/>
			    <asp:BoundField DataField="AGE" HeaderText="年龄"  SortExpression="AGE" Visible="false"/>
			    <asp:BoundField DataField="ISACCEPTSMS" HeaderText="接受短信"  SortExpression="ISACCEPTSMS" Visible="false" />
			    <asp:BoundField DataField="ISACCEPTINFORMATION" HeaderText="接受资料"  SortExpression="ISACCEPTINFORMATION" Visible="false" />
			    <asp:BoundField DataField="BIRTHDATE" HeaderText="生日"  SortExpression="BIRTHDATE" Visible="false"/>
			    <asp:BoundField DataField="DEALERID" HeaderText="经销商编号"  SortExpression="DEALERID" Visible="false"/>
			    <asp:BoundField DataField="DEALERNAME" HeaderText="经销商名称"  SortExpression="DEALERNAME" Visible="false"/>
			    <asp:BoundField DataField="DEALERCODE" HeaderText="经销商代码"  SortExpression="DEALERCODE" Visible="false"/>
			    <asp:BoundField DataField="ORGNAME" HeaderText="组织名称"  SortExpression="ORGNAME" Visible="false"/>
			    <asp:BoundField DataField="ZONENAME" HeaderText="区域名称"  SortExpression="ZONENAME" Visible="false"/>
			    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                    <div style="white-space: nowrap;">
                        <asp:LinkButton ID="lbtnSelected"  runat="server" Text="选中"  OnClientClick='<%# SelectedCommand(Eval("CUSTOMERID").ToString(), Eval("CUSTOMERCODE").ToString()) %>' ></asp:LinkButton>
				    </div>
				    </itemtemplate>
                </asp:TemplateField>
                </Columns>	
                <RowStyle CssClass="row" />
                <AlternatingRowStyle CssClass="row2" />
                <HeaderStyle CssClass="header" />	
                <PagerStyle CssClass="pager" />	
            </dp:WebGridView>
        </div>
    </div>   
    </form>
</body>
</html>
